package utils;

import java.sql.Connection;
import java.sql.DriverManager;


public class DBService {
	public static final String DRIVER="com.mysql.jdbc.Driver";
	public static final String DBURL="jdbc:mysql://localhost:3306/bookshop?user=root&password=admin&unicode=true&characterEncoding=UTF-8";
	
	static public Connection getConnection(){
		Connection conn=null;
		
		try{
			Class.forName(DRIVER).newInstance();
			conn=DriverManager.getConnection(DBURL);
			return conn;
		}catch(Exception ex){
			ex.printStackTrace();
		}
		
		return conn;
	}
	

}
